package com.tcxhb.job.core.schedule.execute;

import com.tcxhb.job.dao.dataobject.JobInfoDO;
import com.tcxhb.job.dao.dataobject.JobInstanceDO;
import com.tcxhb.job.dao.dataobject.JobMachineDO;
import com.tcxhb.job.common.model.job.RunStrategy;
import com.tcxhb.job.core.entity.JobRunDTO;
import lombok.Data;

import java.util.List;

/**
 * @Description:
 * @Auther: tcxhb
 * @Date: 2022/9/16
 */
@Data
public class JobRunContext {
    public JobRunContext(JobRunDTO req) {
        this.req = req;
    }

    /**
     * 入参
     */
    private JobRunDTO req;
    /**
     * 分配数量
     */
    private Integer shardingNum;
    /**
     * 任务
     */
    private JobInfoDO jobDO;

    private String appName;
    private RunStrategy runStrategy;
    /**
     * 机器列表
     */
    private List<JobMachineDO> machineList;
    /**
     * 机器列表
     */
    private List<JobInstanceDO> instanceList;
}
